<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <div id="app">
    <input type="text" id="text" v-model="message"></input>
    <button @click="btnClick">点击</button>
    <h2 class="content"></h2>
  </div>

  <script src="./lib/vue.js"></script>
  <script>
    const app = Vue.createApp({
      data: function() {
        return {
          message: ""
        }
      },
      methods: {
        btnClick() {
          var contentEl = document.querySelector(".content")
          const message = this.message
          contentEl.textContent = message
        }
      }
    })
    app.mount("#app")
  </script>
</body>
</html>